<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
	.dateWidth1 {
		width: 195px;
	}

	.select_width {
		width: 130px;
	}
</style>
<input type="hidden" name="organization/whether_is_gaoxin_value" value="<x:out select="$xmlData/data/organization/whether_is_gaoxin_value" />"/>
<input type="hidden" name="organization/whether_industrial_base_value" value="<x:out select="$xmlData/data/organization/whether_industrial_base_value" />"/>
<input type="hidden" name="organization/whether_is_province_value" value="<x:out select="$xmlData/data/organization/whether_is_province_value" />"/>
<input type="hidden" name="proposal/contact_psn_tel" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>"/>
<input type="hidden" name="proposal/contact_psn_email" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>"/>

<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo" cellspacing="1">
	<col style="width: 18%" />
	<col style="width: 16%" />
	<col style="width: 16%" />
	<col style="width: 18%" />
	<col style="width: 16%" />
	<col style="width: 16%" />
	<tr>
		<td colspan="6" class="t_bar2"><span class="color_red">*</span>${param.title}</td>
	</tr>
	<tr>
		<td align="right">项目名称：</td>
		<td colspan="5"><input id="project_name" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100" style="width: 604px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />" /></td>
	</tr>
	<tr>
		<td align="right">归口管理部门：</td>
		<td colspan="2">
			<c:set var="recomend_org"> {'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />', 'name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />' } </c:set>
			<cpt:tree id="recomend_org" key="recommended_org"  cacheable="false" className="hn_iuput_kuang required selectWidth3" readonly="true" value="${recomend_org}" label="归口管理部门"
					  showPattern="all" shieldPattern="0" onClick="initTreeValue2">
			</cpt:tree>
			<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" >
			<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
		<td align="right" >申报日期：</td>
		<td colspan="2"> <c:set var="apply_date_curr"><x:out select="$xmlData/data/proposal/apply_date_curr" /></c:set>
			<cpt:date id="apply_date_curr"  name="proposal/submit_date" value="${submit_date}"  className="required date"  label="申报日期" ></cpt:date>
		</td>
	</tr>
	<tr>
		<td align="right">
			所属领域（可多选）：
		</td>
		<td colspan="5">
			<c:set var="field">
				<x:out select="$xmlData/data/proposal/field_value" />
			</c:set>
			<cpt:checkbox key="belong_field1" name="field" value="${field }" width="220px;" repeatColumn="3" onClick="initControlValue(this.id);" style="border: 0px; padding: 0px; margin: 0px;float:left;"></cpt:checkbox>
			<input type="hidden" id="field_value" name="proposal/field_value" class="required" value="<x:out select="$xmlData/data/proposal/field_value" />" label="所属领域">
			<input type="hidden" name="proposal/field_name" value="<x:out select="$xmlData/data/proposal/field_name" />">
		</td>
	</tr>
	<tr>
		<td align="right">项目联系人姓名：</td>
		<td colspan="2">
			<input  type="text" label="项目联系人姓名" name="proposal/contact_psn_cname" style="width: 70%;" class="input_css required" maxlength="30" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
			<span name="proposal/contact_email" style="display: none;"> <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email" />
		    </span> <span name="proposal/contact_tel" style="display: none;"> <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel" /></span>
		</td>
		<td align="right">联系人手机：</td>
		<td colspan="2">
			<input type="text" label="联系人手机" name="proposal/contact_psn_mobile" style="width: 70%;" class="input_css required mobile" onfocus="InitInput.setNumber(this,11,0,0);" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />">
		</td>
	</tr>
	<tr>
		<td align="right">通讯地址：</td>
		<td colspan="2">
			<input type="text" label="通讯地址" name="proposal/mailing_address" style="width: 70%;" class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/proposal/mailing_address" />">
		</td>
		<td align="right">电子邮箱：</td>
		<td colspan="2">
			<input type="text" label="电子邮箱"  name="proposal/email_address" style="width: 70%;"  class="input_css required email" maxlength="50" value="<x:out select="$xmlData/data/proposal/email_address" />">
		</td>
	</tr>
	<tr>
		<td align="right">市（县）已补助金额<br />（万元）： </td>
		<td colspan="2">
			<input id="buzhujine" name="proposal/buzhujine" label="市（县）已补助金额（万元）" type="text" style="text-align: right; width: 70%;" required onfocus="InitInput.setNumber(this,9,2,2);"
							   class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/buzhujine" />" />
		</td>
		<%--<td align="right">项目报审级次：<br/>（省补助资金拨付所属财政局）</td>
		<td colspan="3">
			<c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
			<cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang" readonly="true" value="${sub_step}"  label="项目报审级次"
					  id="sub_step"  showPattern="all" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2" />
			<input type="hidden" id="sub_step_value" name="proposal/sub_step_value"    value="<x:out select="$xmlData/data/proposal/sub_step_value" />" label="项目报审级次">
			<input type="hidden" name="proposal/sub_step_name" value="<x:out select="$xmlData/data/proposal/sub_step_name" />">
		</td>--%>
		<td align="right">项目申请金额（万元）：</td>
		<td colspan="2">
			<input id="shenqingjine" name="proposal/shenqingjine" label="项目申请金额（万元）" style="text-align: right; width: 70%;" onfocus="InitInput.setNumber(this,9,2,2);"
							   type="text" required class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/shenqingjine" />" />
		</td>
	</tr>
	<tr>
		<td align="right">企业上年销售收入<br/>（万元）：</td>
		<td colspan="2">
			<input id="lastyear_sell" name="proposal/lastyear_sell" label="企业上年销售收入（万元）" style="text-align: right; width: 70%;" onfocus="InitInput.setNumber(this,9,2,2);"
				   type="text" required class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/lastyear_sell" />" />
		</td>
		<td align="right">企业上年度税后利润（万元）：</td>
		<td colspan="2">
			<input id="lastyear_profit" name="proposal/lastyear_profit" label="企业上年度税后利润（万元）" style="text-align: right;width: 70%;" onfocus="InitInput.setNumber(this,9,2,2,true,true);"
				   type="text" required class="input_css required maxlength:100" value="<x:out select="$xmlData/data/proposal/lastyear_profit" />" />
		</td>
	</tr>
	<tr>
		<td align="right">实缴保费金额（万元）：</td>
		<td colspan="2">
			<input id="baofeijine" name="proposal/baofeijine" label="实缴保费金额（万元）" style="text-align: right;width: 70%;" onfocus="InitInput.setNumber(this,9,2,2);"
							   type="text" required class="input_css required maxlength:100" onchange="count();" value="<x:out select="$xmlData/data/proposal/baofeijine" />" />
		</td>
		<td align="right">高新技术企业证书编号：</td>
		<td colspan="2">
			<input id="tech_no" name="proposal/tech_no" label="高新技术企业证书编号" style="width: 70%;" type="text" required
				   class="input_css required maxlength:100"  maxlength="100" value="<x:out select="$xmlData/data/proposal/tech_no" />" />
		</td>

	</tr>
	<%--<tr>
		<td align="right"><span class="color_red">*</span>高新技术企业证书编号：</td>
		<td colspan="5"><input id="tech_no" name="proposal/tech_no" label="高新技术企业证书编号" type="text" required class="input_css required maxlength:100" style="width: 604px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/tech_no" />" /></td>
	</tr>--%>
</table>
<br/>
<script type="text/javascript">
	function initTreeValueTeamPerson(treeId, treeNode) {
		//针对单位性质
		if ((treeNode && treeNode.isParent)) {
			scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_code'],[id$='" + treeId
							+ "_code']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
					+ "_value']").val("");
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
							+ "_name']").val("");
			return false;
		}
		var str = treeNode.name.split("-")[0];
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_value'],[id$='" + treeId + "_value']")
				.val(treeNode.id);
		$("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val(str);
		$("#" + treeId).val(str);
		initTreeValue2CallBack();
	}
	function setZhTitle(obj) {
		$("#intro_zh_title").text($(obj).val());
	}
	function localInitTreeValue(treeId, treeNode) {
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			return false;
		}
		var showName = "";
		var parentId = "";
		if (treeNode != null && treeNode.level == 1) {//选择二级
			str = obj.name + "-" + str;
			//obj = obj.parentNode;
			showName = obj.name;
			parentId = obj.id;
			$("#" + treeId).val(showName);
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(
					treeNode.id);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(
					str.split("_")[str.split("_").length - 1]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(
					treeNode.name.split("_")[0]);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
					+ "_value']").val(parentId);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
							+ "_name']").val(showName);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
					+ "_all_name']").val(str);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
					+ "_all_value']").val(treeNode.id);
		} else if (treeNode != null && treeNode.level == 2) {//选择三级
			str = obj.name + "-" + str;
			obj = obj.parentNode;
			showName = obj.name;
			parentId = obj.id;
			$("#" + treeId).val(showName);
			$("#" + treeId).parents("tr").find("[name$='domain_value']").val(
					treeNode.parentNode.id);
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val(
					str.split("_")[1].split("-")[0]);
			$("#" + treeId).parents("tr").find("[name$='domain_name']").text(
					str.split("_")[0]);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
					+ "_value']").val(parentId);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
							+ "_name']").val(showName);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
					+ "_all_name']").val(str);
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
					+ "_all_value']").val(treeNode.id);
		} else {
			$("#" + treeId).val(str);
			$("#" + treeId).parents("tr").find("[name$='domain_value']")
					.val("");
			$("#" + treeId).parents("tr").find("[name$='subject_no']").val("");
			$("#" + treeId).parents("tr").find("[name$='domain_name']")
					.text("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_name'],[id$='" + treeId
					+ "_all_name']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_all_value'],[id$='" + treeId
					+ "_all_value']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
					+ "_value']").val(treeNode.id);
			$("#" + treeId).parents("td")
					.find(
							"[name$='" + treeId + "_name'],[id$='" + treeId
							+ "_name']").val(str);
		}
	}
	function setEmptyValueForTree(id) {
		$("#" + id).parents("tr").find("[name$='domain_value']").val("");
		$("#" + id).parents("tr").find("[name$='subject_no']").val("");
		$("#" + id).parents("tr").find("[name$='domain_name']").text("");
		$("#" + id).parents("td").find(
				"[name$='" + id + "_all_name'],[id$='" + id + "_all_name']")
				.val("");
		$("#" + id).parents("td").find(
				"[name$='" + id + "_all_value'],[id$='" + id + "_all_value']")
				.val("");
		$("#" + id).val("");
		$("#" + id + "_hideId").val("");
		$("#" + id + "_hideName").val("");
		$("#" + id + "_code").val("");
		$("#" + id + "_value").val("");
		$("#" + id + "_name").val("");
		$(
				"#" + id + ",[name$='/" + id + "_code']" + ",[name$='/" + id
				+ "_name'],[name$='/" + id + "_value']").val("");
	}
	function showText(obj) {

		if (($(obj).attr("checked") == "checked")) {
			$("#" + $(obj).attr("name") + "_other").css("display", "");
			$("#" + $(obj).attr("name") + "_other").addClass("required");
		} else {
			$("#" + $(obj).attr("name") + "_other").css("display", "none");
			$("#" + $(obj).attr("name") + "_other").val("");
			$("#" + $(obj).attr("name") + "_other").removeClass("required");
		}
	}
	$(document).ready(function() {
		$('#basicInfo tr:even').addClass("li_2");
		$('#basicInfo tr:odd').addClass("li_1");

		/**if ($("#innovate2_value").val().indexOf("03") != -1) {
			$("#innovate2_other").css("display", "");
			$("#innovate2_other").addClass("required");
		}
		 if ($("#innovate_team_value").val().indexOf("03") != -1) {
			$("#innovate_team_other").css("display", "");
			$("#innovate_team_other").addClass("required");
		}**/
	});
</script>
